Page({
  data: {
    houseDetail: {},
    id: ''
  },
  onLoad ({ id }) {
    // console.log(id)
    this.getHouseDetail(id)
  },
  async getHouseDetail (id) {
    // 调用接口
    const { data: houseDetail } = await wx.http.get('/room/' + id)
    this.setData({ houseDetail, id })
  },

  editHouse () {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id
    })
  }
})
